<?php
$isadmin=1;
include '../../comm/config.php';
include '../check.php';
include('../../comm/class_db.php');
include('../../comm/checkpostandget.php');
include_once '../include/page.class.php';
$table="noword";
$cat=include('../../data/'.$table.'_cat.php');
$admin_arr=array('addedi','list','save','cache','del');
if(in_array($_GET['act'],$admin_arr)){
	include($_GET['act'].".php");
	if($_GET['act']=='save' || $_GET['act']=='del'){
	    $sql="select word from ".$BIAOTOU.$table;
        $query=mysql_query($sql);
        $js = "noWordArr=new Array();";
        $k=0;
        while($row=mysql_fetch_array($query)){
            $words[]=$row['word'];
	        $js.= "\r\n";
            $js.= "noWordArr[".$k."]='".$row['word']."';";
	        $k++;
        }
        $data = "<?php\n return " . var_export($words, true) . ";\n?>";
        file_put_contents('../../cache/no_words.php', $data);
        file_put_contents('../../data/noWordArr.js',$js);
	}
}
else{
	echo "miss act";
}
mysql_close();
?>